#ifndef ANALYSER_H
#define ANALYSER_H

#include "Model.h"
#include "../ObjectModel/TypeHierarchy.h"

#include <set>

namespace SemanticModel
{
	class Analyser
	{
	private:
		const Model& _model;
		ObjectModel::TypeHierarchy _result;
	public:
		Analyser(const Model& model);
		ObjectModel::TypeHierarchy& result() { return _result; }
	private:
		bool analyse();
		void createClasses();
		void createOperations(bool isAbstract);
		void createAttributes();
		void makeGeneralization();
		void makeImplementation();

		void recursiveFindAll(const wchar_t* node, 
			SemanticModel::RelationType relation, std::set<std::wstring>& result);
	};
}

#endif // ANALYSER_H